﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZX.OA.Model;
using ZX.OA.DAL;

namespace ZX.OA.BLL
{
  public  class NewsInfoBLL
    {
        NewsInfoDAL dal = new NewsInfoDAL();
        /// <summary>
        /// 显示新闻公告表
        /// </summary>
        /// <returns></returns>
        public List<ZX.OA.Model.NewsInfo> ShowNewInfo()
        {
            return dal.ShowNewInfo();
        }
        /// <summary>
        /// 新闻 公告表添加
        /// </summary>
        /// <param name="n"></param>
        /// <returns></returns>
        public int AddNewInfo(ZX.OA.Model.NewsInfo n)
        {
            return dal.AddNewInfo(n);
        }
        /// <summary>
        /// 获取新闻公告类型表
        /// </summary>
        /// <returns></returns>
        public List<NewsTypeInfo> getid()
        {
            return dal.getid();

        }
        /// <summary>
        /// 根据标号删除新闻信息表数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DelNewInfo(int id)
        {
            return dal.DelNewInfo(id);
        }
        /// <summary>
        /// 根据标号获取新闻类型表id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ZX.OA.Model.NewsTypeInfo GetNewsTypeInfoById(int id)
        {
            return dal.GetNewsTypeInfoById(id);
        }
        /// <summary>
        /// 根据标号获取新闻表id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ZX.OA.Model.NewsInfo GetNewsTypeInfoByIds(int id)
        {
            return dal.GetNewsTypeInfoByIds(id);
        }
        /// <summary>
        /// 修改新闻公告表
        /// </summary>
        /// <param name="n"></param>
        /// <returns></returns>
        public int UptNewInfo(ZX.OA.Model.NewsInfo n)
        {
            return dal.UptNewInfo(n);
        }
        /// <summary>
        /// 公司新闻公告表的模糊查询
        /// </summary>
        /// <param name="AssentName"></param>
        /// <returns></returns>
        public List<ZX.OA.Model.NewsInfo> SreachNewsInfo(string NewsTitle)
        {
            return dal.SreachNewsInfo(NewsTitle);
        }
    }
}
